package com.ruoyi.scheme.service.Impl;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.scheme.mapper.PlantMapper;
import com.ruoyi.scheme.pojo.Plant;
import com.ruoyi.scheme.service.PlantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PlantServiceImpl implements PlantService {

    @Autowired
    private PlantMapper plantMapper;

    //查询播撒草籽对应的草本植物信息
    @Override
    @DataSource(DataSourceType.SLAVE)
    public List<Plant> searchHerbage() {
        return plantMapper.searchHerbage();
    }

    //查询补种植被对应的木本植物信息
    @Override
    @DataSource(DataSourceType.SLAVE)
    public List<Plant> searchXylophyta() {
        return plantMapper.searchXylophyta();
    }
}
